<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link
      rel="stylesheet"
      href="/node_modules/bootstrap/dist/css/bootstrap.css"
    />
  </head>
  <body>
    <div class="container">
      <div class="tabs_header">
        <div class="header_item active">环境育人</div>
        <div class="header_item">环境育人
        </div>
        <div class="header_item">环境育人</div>
        <div class="header_item">环境育人</div>
      </div>
      <div class="tabs_content">
        <div class="content_item">1</div>
        <div class="content_item active">2</div>
        <div class="content_item">3</div>
        <div class="content_item">4</div>
      </div>

      <img src="/static/images/yy.png.png" alt="">

      <style>
        img {
          filter:  drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
        }
      </style>

      <script>
        $(function () {
          $(".tabs_header .header_item").click(function () {
            let index = $(this).index();
            $(this).addClass("active").siblings().removeClass("active");

            $(".tabs_content .content_item")
              .eq(index)
              .addClass("active")
              .siblings()
              .removeClass("active");
          });
        });
      </script>
      <style>
        .tabs_header {
          display: flex;
          justify-content: center;
        }
        .header_item {
          margin-right: 40px;
          padding-bottom: 10px;
          position: relative;
          cursor: pointer;
        }
        .header_item::before {
          content: " ";
          position: absolute;
          bottom: 0;
          left: 0;
          width: 0;
          transition: all 0.3s ease-in-out;
          height: 4px;
          background: linear-gradient(to right, #86a2fd, #ccd6f8);
        }
        .header_item:last-child {
          margin-right: 0;
        }

        .header_item:hover::before {
          width: 100%;
        }

        .tabs_header .header_item.active::before {
          width: 100%;
        }

        .tabs_content {
          border: 1px solid #ccc;
          padding: 20px;
        }
        .tabs_content .content_item {
          display: none;
        }
        .tabs_content .content_item.active {
          display: block;
        }
      </style>
    </div>
  </body>
</html>
